package sv.gob.mh.dgii.service.security;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import sv.gob.mh.dgii.dao.hibernate.Dao;
import sv.gob.mh.dgii.dao.security.AsRolDao;
import sv.gob.mh.dgii.model.AsOpcion;
import sv.gob.mh.dgii.model.AsRol;
import sv.gob.mh.dgii.service.BaseService;

@Service
@Transactional
public class AsRolServiceImpl extends BaseService implements AsRolService {

    @Autowired
    private AsRolDao asRolDao;

    @Override
    public Dao getDao() {
        return asRolDao;
    }

    @Override
    public List<AsRol> findBySRolLike(String srol) {
        return asRolDao.findBySRolLike(srol);
    }

    @Override
    public AsRol findBySRol(String srol) {
        return asRolDao.findBySRol(srol);
    }

    @Override
    public List<AsRol> findAllBySRol(String[] authorities) {
        return asRolDao.findAllBySRol(authorities);
    }

    @Override
    public List<AsRol> findByOpcion(AsOpcion opcion) {
        return asRolDao.findByOpcion(opcion);
    }
}
//class